<template>
  <div class="content-supplier">
    <FilterForm :data="filterData" @search="getList" label-width="85px" />

    <Table
     :api="$Api.supplier.info.list"
      @dbClick="dblclick"
      ref="Table"
    >
      <el-table-column
        label="编号"
        align="center"
        prop="supplierId"
        width="100"
      />
      <el-table-column
        label="名称"
        align="center"
        prop="supplierName"
        width="200"
      />
      <el-table-column
        label="公司全称"
        align="center"
        prop="corporateName"
        width="200"
      />
      <el-table-column
        label="类别"
        align="center"
        prop="supplierTypeName"
        width="120"
      />
      <el-table-column label="联系人" align="center" prop="customerLinkman" />
      <el-table-column label="采购员" align="center" prop="businessPersonnel" />
    </Table>
  </div>
</template>

<script>
export default {
    props:{
        value: String,
    },
    data() {
        return {
            filterData: [
                {
                    label: "供应商类别",
                    name: "supplierType",
                    type: "select",
                    select: "supplier",
                },     
                {
                    label: "名称",
                    name: "supplierName",
                },
            ],
        }
    },
    watch:{
    
    },
    methods:{
        /** 查询列表 */
        getList(params) {
            this.$refs.Table.getData(params);
        },
        dblclick(row) {
            let { supplierName } = row;
            this.$emit("input", supplierName);
            this.selectValue = supplierName;
            this.$parent.$emit('cancelClick',this.selectValue)
        },
    }
}
</script>